package signleton;

public class LazyNotSafeBlock {

    private LazyNotSafeBlock sington;

    private LazyNotSafeBlock() {
    }

    

    public LazyNotSafeBlock getBean(){
        if (sington == null) {
            //别的写法 synchronized (sington.class) {
            synchronized(LazyNotSafeBlock.class) {

//                if (sington == null) {
                    sington = new LazyNotSafeBlock();
//                }
            }
        }
        return sington;
    }
}
